<?php

header('Content-Type:text/xml');

$title = strtolower((string)$_GET['title']);
$walk = '';
$temp = '';
$lines = '';
if($title != null)
{
  $lines = file('data.xml');
  foreach ($lines as $line_num => $line) 
  {
    $line1 = strtolower($line);
    if(substr_count($line1, $title) > 0)
    {
      $walk = $walk . $line;
    }
  }
}

echo <<<XML
<walks>$walk</walks>
XML;
?>
